{% if page_nav_cssclass %}
    <p class="{{ page_nav_cssclass }}"> <!-- Page navigation -->
{% else %}
    <p>
{% endif %}
    <!-- TODO: refactor thread_menu to menu_right -->
    {% if page_range %}
        <span id="page_skip" class="thread_menu" style="display:none;">
            {% for page_num in page_range %}
                {% ifnotequal page_num page %}<a href="{{ page_nav_urlbase }}page{{ page_num }}/">{% endifnotequal %}
                    {{ page_num }}
                {% ifnotequal page_num page %}</a>{% endifnotequal %}
            {% endfor %}
        </span>
    {% endif %}

    {% if page_prev %}<a href="{{ page_nav_urlbase }}page{{ page_prev }}">previous</a> &#149; {% endif %}
    page {{ page }} of {{ page_total }}
    {% if page_next %} &#149; <a href="{{ page_nav_urlbase }}page{{ page_next }}">next</a> {% endif %}

    {% if page_range %}
    &#149; <a href="#" onClick="toggle('page_skip', 'inline');">skip to page...</a>
    {% endif %}
</p>
